home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / TUTOR.ZIP / DEMO1.ASM < prev    next >
Assembly Source File  |  1995-01-25  |  1KB  |  20 lines

  1.      mov     ax,3             ;reset video to text mode
  2.      int     10h                      ;= clear the screen (CLS)
  3.      mov     es,0b800h                ;set es to text video segment
  4.      mov     si,message               ;message to display
  5.      mov     di,1760                  ;display at line 11 on video
  6.      mov     ah,7                     ;medium white color
  7. nex1: mov    al,[si]                  ;byte from code seg message
  8.      inc     si                       ;message +1
  9.      cmp     al,0                     ;end of message ?
  10.      jz      done                     ;if so, jump to done
  11.      mov     es:[di],ax               ;move byte+color to video
  12.      add     di,2                     ;next video word address
  13.      jmp     nex1                     ;do next video
  14. done: mov    ah,0                     ;wait for any key pressed
  15.      int     16h                      ;keyboard interrupt
  16.     mov    ax,4c00h                  ;interrupt 21h exit instruct.
  17.      int     21h                      ;return to DOS> ready prompt
  18. message:
  19. db 'Captain Russell is now in command of the Starship Enterprise.',0
  20.